//
//  GameViewModel.swift
//  StudyDY
//
//  Created by yinchangming on 2018/7/9.
//  Copyright © 2018年 yinchangming. All rights reserved.
//

import UIKit
/**
 游戏模块 网络请求
 
 **/
class GameViewModel: NSObject {
    
    lazy var games=[GameBean]()
    
}

extension GameViewModel{
    func  requsetGame(callBack:@escaping () ->()){
        NetTools.requsetData(urlStr: getColumnDetail, type: .get) { (result) in
               let resultDict =  result as! [String :Any]
               let dataArr = resultDict["data"] as! [[String : Any]]
            for  dict in dataArr{
                self.games.append(GameBean(dict: dict))
            }
    
            callBack()
        }
    }
}
